﻿using System;
using System.Windows.Data;

namespace TelerikWrappedControl
{
    //public enum StatoAvanzamento
    //{0126
    //    MaterialeOrdinato,
    //    TagliatoInCoda,
    //    InCoda,
    //    InTrattamento,
    //    DaConsegnare,
    //    Consegnato,
    //    MaterialeDaTagliare,
    //}
    public class StatoAvanzamentoConverter: IValueConverter
    {
        #region IValueConverter Members
    
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value == null) return null;

            var v = int.Parse(value.ToString());

            switch (v)
            {
                case 0:
                    return "Materiale Ordinato";

                case 1:
                    return "Tagliato (In Coda)";

                case 2:
                    return "In Coda";

                case 3:
                    return "In Trattamento";

                case 4:
                    return "Da Consegnare";

                case 5:
                    return "Consegnato";

                case 6:
                    return "Mat. Da Tagliare";

                default:
                   return null;
            }

            return string.Empty;
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    
        #endregion
    }
}